﻿<UserControl x:Class="UIComposition.Modules.Employee.EmployeesDetailsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
    xmlns:Regions="clr-namespace:Microsoft.Practices.Composite.Presentation.Regions;assembly=Microsoft.Practices.Composite.Presentation">
    <StackPanel Margin="0,5,0,5">
        <Controls:TabControl AutomationProperties.AutomationId="DetailsTabControl" Regions:RegionManager.RegionName="TabRegion"
        Width="Auto" Height="Auto" Margin="0,5,0,0" HorizontalAlignment="Stretch">
            <Regions:TabControlRegionAdapter.ItemContainerStyle>
                <Style TargetType="Controls:TabItem">
                    <Setter Property="HeaderTemplate">
                        <Setter.Value>
                            <DataTemplate>
                                <TextBlock Text="{Binding HeaderInfo}" />
                            </DataTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Regions:TabControlRegionAdapter.ItemContainerStyle>
            <Controls:TabItem  Header="General">
                <Grid  DataContext="{Binding SelectedEmployee}"  Width="Auto" Height="Auto">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width=".5*" />
                        <ColumnDefinition Width=".5*" />
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Column="0" Orientation="Vertical">
                        <TextBlock Text="First Name:" HorizontalAlignment="Left" Padding="0,5,5,5" FontWeight="Bold" />
                        <TextBox AutomationProperties.AutomationId="FirstNameTextBox" Text="{Binding Path=FirstName, Mode=TwoWay}" Height="Auto" Width="Auto"  HorizontalAlignment="Stretch" Margin="0,5,100,5" ></TextBox>
                        <TextBlock Text="Phone:" HorizontalAlignment="Left" Padding="0,5,5,5" FontWeight="Bold" />
                        <TextBox AutomationProperties.AutomationId="PhoneTextBox" Text="{Binding Path=Phone, Mode=TwoWay}" Height="Auto" Width="Auto"  HorizontalAlignment="Stretch" Margin="0,5,100,5" ></TextBox>
                    </StackPanel>
                    <StackPanel Grid.Column="1">
                        <TextBlock Text="Last Name:" HorizontalAlignment="Left" Padding="0,5,5,5" FontWeight="Bold" />
                        <TextBox AutomationProperties.AutomationId="LastNameTextBox" Text="{Binding Path=LastName, Mode=TwoWay}" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" Margin="0,5,100,5" ></TextBox>
                        <TextBlock Text="Email:" HorizontalAlignment="Left" Padding="0,5,5,5" FontWeight="Bold" />
                        <TextBox AutomationProperties.AutomationId="EmailTextBox" Text="{Binding Path=Email, Mode=TwoWay}" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" Margin="0,5,100,5" ></TextBox>
                    </StackPanel>
                </Grid>
            </Controls:TabItem>
            <!--<Controls:TabItem Header="Location">
                <StackPanel>
                    <Frame Source="{Binding AddressMapUrl}" Height="210"  NavigationFailed="Frame_NavigationFailed" Navigated="Frame_Navigated"></Frame>
                    <TextBlock Name="ErrorText" Foreground="Red" Visibility="Hidden" />
                </StackPanel>
            </Controls:TabItem>-->
        </Controls:TabControl>
    </StackPanel>
</UserControl>
